home *** CD-ROM | disk | FTP | other *** search
/ Mac Cube 4: Multimedia Applications / MacCube Volume 4: Multimedia Applications.iso / Graphics / GraphicConverter 2.0.4 (US) / Plug-ins / ImportExport.p next >
Text File  |  1994-06-06  |  2KB  |  86 lines

  1. unit ImportExport;
  2.  
  3. interface
  4.  
  5.  
  6. { File type of an extension: PLUG }
  7. { Creator of an extension: GKON }
  8. {}
  9. { Definition of an import extension: }
  10. { STR# number 1024 index 1 contains the name }
  11. { STR# number 1024 index 2 contains the file type of the graphic files }
  12. { PLUG number 1024 contains the 68K code resource for the import extension }
  13. {}
  14. { Definition of an export extension: }
  15. { STR# number 2048 index 1 contains the name }
  16. { STR# number 2048 index 2 contains the file type of the graphic files }
  17. { PLUG number 2048 contains the 68K code resource for the export extension }
  18. {}
  19. { One extension can contain the import and export resources }
  20.  
  21.     type
  22.         T_ColorTableArr = array[0..255] of RGBColor;
  23.         T_ColorTablePtr = ^T_ColorTableArr;
  24.  
  25.         T_ImportRec = record
  26.                 version: Longint; { 0 }
  27.  
  28.                 callKind: Longint; { 0 - all available, 1 - format was especially selected }
  29.  
  30.                 progressProcPtr: ptr; { nil, if not function available }
  31.                 progressType: Longint; { 0-68K, 1-PPC }
  32.  
  33.                 createVectorPict: Longint; { 0-no, 1-yes }
  34.                 vectorPictHdl: PicHandle;
  35.  
  36.                 srcDataHdl: Handle;
  37.                 srcDataSize: Longint;
  38.                 srcFile: FSSpec;
  39.  
  40.                 destDataHdl: Handle;
  41.                 destBitsPerPixel: Longint;
  42.                 destBytesPerLine: Longint;
  43.                 destWidth: Longint;
  44.                 destHeight: Longint;
  45.                 destDataSize: Longint; { in bytes }
  46.                 destColorTablePtr: T_ColorTablePtr; { preallocated for 256 colors, fill only the fields }
  47.                 destKindStr: str255;
  48.                 destFileType: ResType;
  49.  
  50.                 success: Longint; { 0 - no, 1 - yes }
  51.             end;
  52.         T_ImportPtr = ^T_ImportRec;
  53.  
  54.         T_ExportRec = record
  55.                 version: Longint; { 0 }
  56.  
  57.                 progressProcPtr: ptr;  { nil, if not function available }
  58.                 progressType: Longint; { 0-68K, 1-PPC }
  59.  
  60.                 srcDataPtr: ptr;
  61.                 srcBitsPerPixel: Longint;
  62.                 srcBytesPerLine: Longint;
  63.                 srcWidth: Longint;
  64.                 srcHeight: Longint;
  65.                 srcColorTablePtr: T_ColorTablePtr;
  66.                 srcDataSize: Longint; { in bytes }
  67.  
  68.                 destFSSpecRec: FSSpec;
  69.  
  70.                 success: Longint; { 0 - no, 1 - yes }
  71.             end;
  72.         T_ExportPtr = ^T_ExportRec;
  73.  
  74.     const
  75.         C_SetTitle = 0;
  76.         C_InitProgressBar = 1;
  77.         C_SetProgressValue = 2;
  78.         C_ClearProgressBar = 3;
  79.  
  80. { prototype for progress function: }
  81. { procedure Progress(command:Longint; title:str255; percent:Longint);}
  82. { percent in the range 0..100 }
  83.  
  84. implementation
  85.  
  86. end.